package com.mdp.behavioral.chain;

public abstract class Handler {
    
    protected String card;
    
    protected Handler next;
    
    public void setNext(Handler next) {
        if (this != next) {
            this.next = next;
        }
    }
    
    public Handler nexter(Handler next) {
        if (this != next) {
            this.next = next;
        }
        return this.next;
    }
    
    public abstract void handlerReq(Event evt);
    
    public void outString() {
        System.out.println(this.card);
    }
    
}
